﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ADO.NET.Samples.Common;
using ADO.NET.Samples.DBML;

namespace ADO.NET.Samples.Forms.LINQ.LINQToSQL
{
    [FormDescription("LINQ to SQL Data Binding", "Demonstrate how to use LINQ to SQL to bind data.")]
    public partial class LINQtoSQLDataBinding : Form
    {
        public LINQtoSQLDataBinding()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Data binding
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void LINQtoSQLDataBinding_Load(object sender, EventArgs e)
        {
            this.userBindingSource.DataSource = new ArticleDataClassesDataContext().Users;
        }
    }
}
